﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using ESRI.ArcGIS.Geodatabase;

namespace Tayninh2011
{
    interface ITnToolsTable
    {
        //string a { set; get; }
        void TnShowData(IWorkspaceEdit workspace,DataGridView dataGridView, string nameTable,string nameFields, string dieukien, int gioihan);
        void TnShowData(IWorkspaceEdit workspace, DataGridView dataGridView, IFeatureClass table,string nameFields, string dieukien, int gioihan);
        void TnShowDataUseSQL(string server, string database, string user, string pass,string table, string dieukien, int gioihan,DataGridView dataGridView);
        List<string[]> TnShowDataUseSQL(string server, string database, string user, string pass, string table, string dieukien, int gioihan);
        List<string[]> TnShowDataUseSQL(string[,] user_info, string table, string dieukien, int gioihan);
        List<string[]> TnShowDataUseSQL(SqlConnection sql_connection, string table, string dieukien, int gioihan);
        List<string[]> TnShowDataUseSQL(SqlConnection sql_connection, string table, out string[] field_name, string dieukien, int gioihan);

        SqlConnection TnOpenConnection(string[,] user_info);
        bool TnInsertValue(SqlConnection sql_connection,string table_name, string[] fields, List<string[]> values);
        bool TnUpdateValue(SqlConnection sql_connection, string table_name, string field, string value,string field_key,string value_key);
        void TnShowDataWithGivenCursor(ICursor cursor, DataGridView dataGridView,string nameFields, string dieukien, int gioihan);
        ICursor TnQueryAttribute(IWorkspaceEdit workspace, string table, string fields, string dieukien);
        ICursor TnQueryAttribute(IWorkspaceEdit workspace, IFeatureClass table, string fields, string dieukien);
        void TnFormatTable(IWorkspaceEdit workspace, string thua, string duong, string hem);
        void TnFormatColumn(IWorkspaceEdit workspace, string table, string column,object value);
        void TnFormatColumn(IWorkspaceEdit workspace, string table, string column, object value,string dieukien);
        void TnFormatTable(IWorkspaceEdit workspace, string table);
        bool TnCreateTable(string table_name, string[,] user_info, List<string[]> columns_with_type);
    }
}
